<template>
  <div class="tool-bar-ri">
    <div class="header-icon">
      <AssemblySize id="assemblySize" />
      <Language id="language" />
      <SearchMenu id="searchMenu" />
      <ThemeSetting id="themeSetting" />
      <Message id="message" />
      <Fullscreen id="fullscreen" />
    </div>
    <span class="username">{{ appStore.userName }}</span>
    <span class="flagId" :class="{ flagIdActive: appStore.flagIdentity === 'Y' }">{{ appStore.flagIdentity === "Y" ? "已认证" : "未认证" }}</span>
    <Avatar />
  </div>
</template>

<script setup lang="ts">
// import AssemblySize from "./components/AssemblySize.vue";
// import Language from "./components/Language.vue";
// import SearchMenu from "./components/SearchMenu.vue";
import ThemeSetting from "./components/ThemeSetting.vue";
import Message from "./components/Message.vue";
import Fullscreen from "./components/Fullscreen.vue";
import Avatar from "./components/Avatar.vue";
import { useAppStore } from "@/stores/modules/app";

const appStore = useAppStore();
</script>

<style scoped lang="scss">
.tool-bar-ri {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 25px;
  .header-icon {
    display: flex;
    align-items: center;
    & > * {
      margin-left: 21px;
      color: var(--el-header-text-color);
    }
  }
  .username {
    margin: 0 5px;
    font-size: 15px;
    color: var(--el-header-text-color);
  }
  .flagId {
    color: rgb(175, 170, 170);
    border: 1px solid rgb(175, 170, 170);
    margin: 0 5px;
    font-size: 0.65em;
    font-weight: 600;
    padding: 3px;
    border-radius: 4px;
  }
  .flagIdActive{
    color: var(--el-color-success);
    border: 1px solid var(--el-color-success);
  }
}
</style>
